<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SSD1306 OLED display driver: ssd1306_uart.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SSD1306 OLED display driver
   &#160;<span id="projectnumber">1.8.2</span>
   </div>
   <div id="projectbrief">This library is developed to control SSD1306/SSD1331/SSD1351/IL9163/PCD8554 RGB i2c/spi LED displays</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">ssd1306_uart.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;stdint.h&gt;</code><br />
</div>
<p><a href="ssd1306__uart_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:adff6f1691b8119f8c50293135a28e1b3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ssd1306__uart_8h.html#adff6f1691b8119f8c50293135a28e1b3">UART_BUFFER_RX</a>&#160;&#160;&#160;32</td></tr>
<tr class="separator:adff6f1691b8119f8c50293135a28e1b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aea3c2acc281315ff5dc9f400845bf406"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ssd1306__uart_8h.html#aea3c2acc281315ff5dc9f400845bf406">uart_init</a> (uint32_t baud)</td></tr>
<tr class="memdesc:aea3c2acc281315ff5dc9f400845bf406"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes uart module.  <a href="#aea3c2acc281315ff5dc9f400845bf406">More...</a><br /></td></tr>
<tr class="separator:aea3c2acc281315ff5dc9f400845bf406"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a6add2293e47c6adb4070dcafb77991"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ssd1306__uart_8h.html#a0a6add2293e47c6adb4070dcafb77991">uart_send_byte</a> (uint8_t c)</td></tr>
<tr class="memdesc:a0a6add2293e47c6adb4070dcafb77991"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends single byte over UART.  <a href="#a0a6add2293e47c6adb4070dcafb77991">More...</a><br /></td></tr>
<tr class="separator:a0a6add2293e47c6adb4070dcafb77991"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9303a912df9a76702c17750f3f0a5bf0"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ssd1306__uart_8h.html#a9303a912df9a76702c17750f3f0a5bf0">uart_byte_available</a> (void)</td></tr>
<tr class="memdesc:a9303a912df9a76702c17750f3f0a5bf0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns non-zero code if there are bytes in RX buffer.  <a href="#a9303a912df9a76702c17750f3f0a5bf0">More...</a><br /></td></tr>
<tr class="separator:a9303a912df9a76702c17750f3f0a5bf0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8cd92b6cf3b75bf832242080a7dbe6c2"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ssd1306__uart_8h.html#a8cd92b6cf3b75bf832242080a7dbe6c2">uart_read_byte</a> (void)</td></tr>
<tr class="memdesc:a8cd92b6cf3b75bf832242080a7dbe6c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads byte from UART RX buffer.  <a href="#a8cd92b6cf3b75bf832242080a7dbe6c2">More...</a><br /></td></tr>
<tr class="separator:a8cd92b6cf3b75bf832242080a7dbe6c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Uart implementation for SSD1306 library</p>
<p>Define UART_INTERRUPT_ENABLE before including this header, if you want interrupt-based UART support. Define CONFIG_AVR_UART_AVAILABLE and CONFIG_AVR_UART_ENABLE before including this header, if you want to use uart module outside ssd1306 library. </p>

<p class="definition">Definition in file <a class="el" href="ssd1306__uart_8h_source.html">ssd1306_uart.h</a>.</p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="adff6f1691b8119f8c50293135a28e1b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adff6f1691b8119f8c50293135a28e1b3">&#9670;&nbsp;</a></span>UART_BUFFER_RX</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UART_BUFFER_RX&#160;&#160;&#160;32</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Rx buffer size, used by AVR USART implementation </p>

<p class="definition">Definition at line <a class="el" href="ssd1306__uart_8h_source.html#l00049">49</a> of file <a class="el" href="ssd1306__uart_8h_source.html">ssd1306_uart.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a9303a912df9a76702c17750f3f0a5bf0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9303a912df9a76702c17750f3f0a5bf0">&#9670;&nbsp;</a></span>uart_byte_available()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t uart_byte_available </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns non-zero code if there are bytes in RX buffer. </p>
<p>Returns non-zero code if there are bytes in RX buffer </p>

<p class="definition">Definition at line <a class="el" href="ssd1306__uart_8c_source.html#l00128">128</a> of file <a class="el" href="ssd1306__uart_8c_source.html">ssd1306_uart.c</a>.</p>

</div>
</div>
<a id="aea3c2acc281315ff5dc9f400845bf406"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aea3c2acc281315ff5dc9f400845bf406">&#9670;&nbsp;</a></span>uart_init()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void uart_init </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>baud</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Initializes uart module. </p>
<p>Initializes uart module. Depending on UART_INTERRUPT_ENABLE define, module will be initialized in interrupt mode or synchronouse mode.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">baud</td><td>baud rate for the uart module </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>only 115200, 57600, 38400 and 19200 are supported. </dd></dl>

<p class="definition">Definition at line <a class="el" href="ssd1306__uart_8h_source.html#l00068">68</a> of file <a class="el" href="ssd1306__uart_8h_source.html">ssd1306_uart.h</a>.</p>

</div>
</div>
<a id="a8cd92b6cf3b75bf832242080a7dbe6c2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8cd92b6cf3b75bf832242080a7dbe6c2">&#9670;&nbsp;</a></span>uart_read_byte()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t uart_read_byte </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads byte from UART RX buffer. </p>
<p>Reads byte from UART RX buffer. Please, check bytes availability via <a class="el" href="ssd1306__uart_8h.html#a9303a912df9a76702c17750f3f0a5bf0" title="Returns non-zero code if there are bytes in RX buffer. ">uart_byte_available()</a> before calling this function. </p>

<p class="definition">Definition at line <a class="el" href="ssd1306__uart_8c_source.html#l00137">137</a> of file <a class="el" href="ssd1306__uart_8c_source.html">ssd1306_uart.c</a>.</p>

</div>
</div>
<a id="a0a6add2293e47c6adb4070dcafb77991"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0a6add2293e47c6adb4070dcafb77991">&#9670;&nbsp;</a></span>uart_send_byte()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void uart_send_byte </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sends single byte over UART. </p>
<p>Sends single byte over UART. The function doesn't use any internal buffers, so it returns control once byte is sent.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>byte to send. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="ssd1306__uart_8c_source.html#l00117">117</a> of file <a class="el" href="ssd1306__uart_8c_source.html">ssd1306_uart.c</a>.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
